package com.lefull.lefullbase.utils.OkGoHelper;



import com.lzy.okgo.callback.AbsCallback;
import com.lzy.okgo.convert.StringConvert;
import com.lzy.okgo.model.Response;
import com.lzy.okgo.request.base.Request;

public abstract class LeFullStringCallback extends AbsCallback<String> {

    private StringConvert convert;

    public LeFullStringCallback() {
        convert = new StringConvert();
    }

    @Override
    public void onStart(Request<String, ? extends Request> request) {
        super.onStart(request);
    }

    @Override
    public String convertResponse(okhttp3.Response response) throws Throwable {
        String s = convert.convertResponse(response);
        response.close();
        return s;
    }

    @Override
    public void onSuccess(Response<String> response) {
    }

    @Override
    public void onError(Response<String> response) {

    }

    @Override
    public void onFinish() {
        super.onFinish();
    }

}
